function! utils_func#printMode() abort
  if &ft && g:nostatus =~? &ft
    return ''
  endif
  let currentmode = {
    \ 'n'  : 'Normal'  , 'no' : 'N-Operator Pending' , '!'  : 'shell'    ,
    \ 'v'  : 'Visual'  , 'V'  : 'V-Line'             , '' : 'V-Block'  ,
    \ 's'  : 'Select'  , 'S'  : 'S-Line'             , '' : 'S-Block'  ,
    \ 'i'  : 'Insert'  , 'R'  : 'Replace'            , 'Rv' : 'V-Replace',
    \ 'c'  : 'Command' , 'r'  : 'Prompt'             , 't'  : 'Terminal' ,
    \ 'cv' : 'Vim Ex'  , 'ce' : 'Ex'                 , 'r?' : 'Confirm'  ,
    \ 'rm' : 'More'
    \ }
  let string = currentmode[mode()]
  if &paste
    let string .= ':Paste'
  endif
  return '[' . string . ']'
endfunction

function! utils_func#humanReadableSize(bytes) abort
  let l:bytes = a:bytes
  if l:bytes == 0 || l:bytes == -1 || l:bytes == -2
    return '0B'
  endif
  if l:bytes < 1024
    let size = l:bytes.'B'
  elseif l:bytes < 1048576
    let size = printf('%.1f', l:bytes/1024.0).'K'
  elseif l:bytes < 1073741824
    let size = printf('%.1f', l:bytes/1048576.0).'M'
  else
    let size = printf('%.1f', l:bytes/1073741824.0).'G'
  endif
  return size
endfunction

function! utils_func#checkBackSpace() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~ '\s'
endfunction
